package com.github.phoenics.militia.bazookaFx.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.phoenics.militia.bazookaFx.dao.SchemaTableColumnViewDao;
import com.github.phoenics.militia.bazookaFx.domain.entity.SchemaTableColumnView;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author Phoenics Chow
 * on 2019年02月01日
 */
@Service
public class SchemaTableColumnViewService extends ServiceImpl<SchemaTableColumnViewDao, SchemaTableColumnView> {
    private static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SchemaTableColumnViewService.class);
    public List<SchemaTableColumnView> columsInTable(String schema,String table){
        QueryWrapper<SchemaTableColumnView> queryWrapper=new QueryWrapper<>();
        queryWrapper.nested(i->i.eq("table_schema",schema).eq("table_name",table));
        return this.list(queryWrapper);
    }

}
